from __future__ import annotations

from dataclasses import dataclass


@dataclass
class TerminationSpec:
    strip_length_mm: int
    stress_cone_size_mm: int
    crimp_force_kN: float
    note: str


def design_termination(cable_core_mm2: int, voltage_kV: int) -> TerminationSpec:
    """电缆终端工艺关键尺寸与压接力建议（经验）。"""

    strip = max(60, int(0.6 * (cable_core_mm2 ** 0.5) * (1 + voltage_kV / 100)))
    cone = max(35, int(0.4 * (cable_core_mm2 ** 0.5) * (1 + voltage_kV / 200)))
    crimp = 0.02 * cable_core_mm2
    return TerminationSpec(strip_length_mm=strip, stress_cone_size_mm=cone, crimp_force_kN=crimp, note="按厂家手册复核")


